/*
 * WheelEvent.cpp
 *
 *  Created on: 2010-9-13
 *      Author: wenjian
 */

#include "WheelEvent.h"
#include "eventtypes.h"

namespace Ed {

  EventType WheelEvent::Type = MOUSE_WHEEL_EVENT_TYPE;

  WheelEvent::WheelEvent(int x, int y, int delta, MouseButton button, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, button, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int x, int y, int delta, unsigned int buttons, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, buttons, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int delta, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int x, int y, int delta, MouseButton button, int key, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, button, key, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int x, int y, int delta, unsigned int buttons, int key, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, buttons, key, source), _delta(delta), _orient(orient)
    {

    }

  WheelEvent::WheelEvent(int delta, int key, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, key, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int x, int y, int delta, MouseButton button, const KeySequence& ks, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, button, ks, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int x, int y, int delta, unsigned int buttons, const KeySequence& ks, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, x, y, buttons, ks, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(int delta, const KeySequence& ks, Orientation orient, void* source):
    MouseEvent(WheelEvent::Type, ks, source), _delta(delta), _orient(orient)
  {
  }

  WheelEvent::WheelEvent(const MouseEvent& me):
    MouseEvent(me)
  {
    if(me.getType() == WheelEvent::Type){
      const WheelEvent& we = (const MouseEvent&)me;
      _delta = we._delta;
      _orient = we._orient;
    }
  }

  WheelEvent::WheelEvent(const WheelEvent& we):
    MouseEvent(we){
    _delta = we._delta;
    _orient = we._orient;
  }

  WheelEvent::WheelEvent(const WheelEvent* we):
    MouseEvent(we){
    _delta = we->_delta;
    _orient = we->_orient;
  }

  WheelEvent::~WheelEvent() {
    // TODO Auto-generated destructor stub
  }

}
